package com.zggk.framework.controller.score;

import com.zggk.framework.service.score.GjGradeService;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import com.platform.framework.controller.BaseController;
import org.springframework.web.bind.annotation.RequestMethod;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.servlet.ModelAndView;

/**
 * @Description 
 * @author 张立增[zhanglizeng] Tel：18860126570
 * @email 1472052711@qq.com
 * @date 2020-02-26 11:30:46
 */
@RestController
@RequestMapping("/gjGrade")
public class GjGradeController extends BaseController{

    @Autowired
    GjGradeService gjGradeService;
  
    /**
     * @Description 得到评分记录
     * @author 张立增
     * @Date 2020年2月29日 下午9:00:12
     */
    @RequestMapping(value = "/loadGradeData",method= {RequestMethod.POST})  
	public String loadGradeData(HttpServletRequest request) throws Exception {   
		String roadType = request.getParameter("roadType"); 
		String id = request.getParameter("id"); 
		String zqCode = request.getParameter("zqCode"); 
		return gjGradeService.loadGradeData(id,zqCode,roadType);
	}
    
    /**
     * @Description  保存或更新数据
     * @author 张立增
     * @Date 2020年2月29日 下午11:50:32
     */
    @RequestMapping(value = "/savaOrUpdateGrade",method= {RequestMethod.POST})  
   	public String savaOrUpdateGrade(HttpServletRequest request) throws Exception {   
   		String roadType = request.getParameter("roadType"); 
   		String id = request.getParameter("id"); 
   		String zqCode = request.getParameter("zqCode"); 
   		String checkScore = request.getParameter("checkScore"); 
   		String checkDate = request.getParameter("checkDate"); 
   		return gjGradeService.savaOrUpdateGrade(id,zqCode,roadType,checkScore,checkDate);
   	}
    
    
    
   
}
